import { registerPanelItemProvider } from "@ibiz-template/runtime";
import { App } from "vue";
import { ScrollContainerProvider } from "./scroll-container/i-biz-scroll-container.provider";
import { ScrollContainerItemProvider } from "./scroll-container-item/i-biz-scroll-container-item.provider";
import ScrollContainer from "./scroll-container/i-biz-scroll-container.vue";
import ScrollContainerItem from "./scroll-container-item/i-biz-scroll-container-item.vue";

export const IBizScrollContainer = {
  install(v: App) {
    v.component("IBizScrollContainer", ScrollContainer);
    v.component("IBizScrollContainerItem", ScrollContainerItem);
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL",
      () => new ScrollContainerProvider()
    );
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL_LEFT",
      () => new ScrollContainerItemProvider()
    );
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL_HEADER",
      () => new ScrollContainerItemProvider()
    );
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL_RIGHT",
      () => new ScrollContainerItemProvider()
    );
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL_BOTTOM",
      () => new ScrollContainerItemProvider()
    );
    registerPanelItemProvider(
      "CONTAINER_CONTAINER_SCROLL_MAIN",
      () => new ScrollContainerItemProvider()
    );
  },
};
